package com.mt.exception;

import com.mt.enums.Status;

/**
 * @author Wang
 * @Description 自定义全局异常类
 * @date 2020/11/9-16:28
 */
public class GlobalException extends  RuntimeException  {
    private Status status=Status.ERROR;

    public GlobalException(Status status, String message) {
        super(message);
        this.status = status;
    }

    public GlobalException(String message) {
        super(message);
    }
    public GlobalException(Status status) {
        super(status.getMsg());
        this.status = status;
    }

    public Status getStatus() {
        return status;
    }

    public void setStatus(Status status) {
        this.status = status;
    }
}
